package org.gap.domain;

import java.io.Serializable;

import java.util.Calendar;

import javax.persistence.Id;

import javax.persistence.*;

/**
 */
public class TiersModifPK implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */
	public TiersModifPK() {
	}

	/**
	 */

	@Column(name = "TMO_TIERS", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer tmoTiers;
	/**
	 */

	@Column(name = "TMO_NOM_CHAMP_MODIF", length = 40, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public String tmoNomChampModif;
	/**
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "TMO_DATE_MODIFICATION", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Calendar tmoDateModification;

	/**
	 */
	public void setTmoTiers(Integer tmoTiers) {
		this.tmoTiers = tmoTiers;
	}

	/**
	 */
	public Integer getTmoTiers() {
		return this.tmoTiers;
	}

	/**
	 */
	public void setTmoNomChampModif(String tmoNomChampModif) {
		this.tmoNomChampModif = tmoNomChampModif;
	}

	/**
	 */
	public String getTmoNomChampModif() {
		return this.tmoNomChampModif;
	}

	/**
	 */
	public void setTmoDateModification(Calendar tmoDateModification) {
		this.tmoDateModification = tmoDateModification;
	}

	/**
	 */
	public Calendar getTmoDateModification() {
		return this.tmoDateModification;
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((tmoTiers == null) ? 0 : tmoTiers.hashCode()));
		result = (int) (prime * result + ((tmoNomChampModif == null) ? 0 : tmoNomChampModif.hashCode()));
		result = (int) (prime * result + ((tmoDateModification == null) ? 0 : tmoDateModification.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof TiersModifPK))
			return false;
		TiersModifPK equalCheck = (TiersModifPK) obj;
		if ((tmoTiers == null && equalCheck.tmoTiers != null) || (tmoTiers != null && equalCheck.tmoTiers == null))
			return false;
		if (tmoTiers != null && !tmoTiers.equals(equalCheck.tmoTiers))
			return false;
		if ((tmoNomChampModif == null && equalCheck.tmoNomChampModif != null) || (tmoNomChampModif != null && equalCheck.tmoNomChampModif == null))
			return false;
		if (tmoNomChampModif != null && !tmoNomChampModif.equals(equalCheck.tmoNomChampModif))
			return false;
		if ((tmoDateModification == null && equalCheck.tmoDateModification != null) || (tmoDateModification != null && equalCheck.tmoDateModification == null))
			return false;
		if (tmoDateModification != null && !tmoDateModification.equals(equalCheck.tmoDateModification))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder("TiersModifPK");
		sb.append(" tmoTiers: ").append(getTmoTiers());
		sb.append(" tmoNomChampModif: ").append(getTmoNomChampModif());
		sb.append(" tmoDateModification: ").append(getTmoDateModification());
		return sb.toString();
	}
}
